home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-03 | 8.4 KB | 299 lines | [TEXT/KAHL] |
- //----------------------------------------------------------------------------------
- // File : demoCDEF.r
- // Purpose : Rez file for demoCDEF π
- // Author : Jim Stout
- // Date : March 12, 1994
- //
- // : NOTE: This demo uses the CDEF 107, renumbered as CDEF 0 to override
- // : the standard CDEF 0 in the MacOS - just for demo purposes in this
- // : dialog.
- //----------------------------------------------------------------------------------
- #include <Types.r>
-
- #define applepopUp 63
- #define groupBox 100
- #define popUp 101
- #define spinner 102
- #define dateTime 103
- #define togButton 4
- #define hSlider 105
- #define vSlider 106
- #define ctl3D 107
- #define progBar 108
-
- include "xDEF.rsrc";
-
- resource 'cctb' (0) { // default control colors
- { /* array ColorSpec: 6 elements */
- /* [1] */ cFrameColor, 384, 384, 26214,
- /* [2] */ cBodyColor, 52428,52428,52428,
- /* [3] */ cTextColor, 0, 0, 65535,
- /* [4] */ cElevatorColor, 0, 0, 0,
- /* [1] */ cFillPatColor, 384, 384, 26214,
- /* [1] */ cTingeLight, 52428, 52428, 52428
- }
- };
-
- // set the Dialog background color to light gray
-
- resource 'dctb' (128) {
- { /* array ColorSpec: 5 elements */
- // /* [1] */ wContentColor, 65535,65535,65535, // white
- /* [1] */ wContentColor, 52428,52428,52428,
- /* [2] */ wFrameColor, 0, 0, 0,
- /* [3] */ wTextColor, 0, 0, 0,
- /* [4] */ wHiliteColor, 0, 0, 0,
- /* [5] */ wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- resource 'DLOG' (128) {
- {44, 20, 326, 492}, movableDBoxProc, visible, goAway, 0x0, 128, ""};
-
-
- resource 'DITL' (128) {
- { /* array DITLarray: 34 elements */
- /* [1] */ {249, 399, 269, 459}, Button {enabled, "OK" },
- /* [2] */ {217, 398, 237, 458}, Button {enabled, "Disable" },
- /* [3] */ {19, 22, 35, 132}, Control {enabled, 128 },
- /* [4] */ {40, 22, 56, 132}, CheckBox {enabled, "Check Box 2" },
- /* [5] */ {92, 22, 108, 142}, Control {enabled, 129 },
- /* [6] */ {113, 22, 129, 142}, RadioButton {enabled, "Radio Button 2" },
- /* [7] */ {134, 22, 150, 142}, RadioButton {enabled, "Radio Button 3" },
- /* [8] */ {186, 20, 204, 140}, Control {enabled, 130 },
- /* [9] */ {209, 20, 227, 140}, Control {enabled, 131 },
- /* [10] */ {232, 20, 250, 140}, Control {enabled, 132 },
- /* [11] */ {255, 20, 273, 140}, Control {enabled, 133 },
- /* [12] */ {18, 220, 36, 381}, Control {enabled, 134 },
- /* [13] */ {41, 220, 59, 302}, Control {enabled, 136 },
- /* [14] */ {64, 220, 82, 302}, Control {enabled, 137 },
- /* [15] */ {142, 169, 165, 360}, Control {enabled, 138 },
- /* [16] */ {173, 169, 192, 315}, Control {disabled, 139 },
- /* [17] */ {173, 394, 192, 419}, Control {enabled, 140 },
- /* [18] */ {223, 169, 248, 354}, Control {enabled, 141 },
- /* [19] */ {253, 343, 271, 354}, Control {enabled, 142 },
- /* [20] */ {97, 298, 121, 419}, Control {enabled, 149 },
- /* [21] */ {7, 426, 112, 468}, Control {enabled, 150 },
- /* [22] */ {173, 424, 193, 458}, Button {enabled, "Set" },
-
- /* [23] */ {19, 180, 35, 220}, StaticText {disabled, "Both :" },
- /* [24] */ {42, 179, 58, 220}, StaticText {disabled, "Date :" },
- /* [25] */ {65, 178, 81, 222}, StaticText {disabled, "Time :" },
- /* [26] */ {253, 178, 269, 264}, StaticText {disabled, "Edit Number:" },
- /* [27] */ {174, 321, 190, 355}, StaticText {disabled, "Size:" },
- /* [28] */ {174, 360, 190, 388}, EditText {enabled, "12" },
- /* [29] */ {254, 269, 270, 338}, EditText {enabled, "0" },
- /* [30] */ {101, 182, 117, 288}, Control {enabled, 151 },
-
- /* [31] */ {1, 8, 17, 152}, Control {enabled, 143 },
- /* [32] */ {74, 8, 90, 152}, Control {enabled, 144 },
- /* [33] */ {168, 8, 184, 152}, Control {enabled, 145 },
- /* [34] */ {1, 164, 17, 419}, Control {enabled, 146 },
- /* [35] */ {128, 164, 144, 466}, Control {enabled, 147 },
- /* [36] */ {209, 164, 225, 364}, Control {enabled, 148 }
- }
- };
-
- resource 'CNTL' (128) {
- {19, 22, 35, 132}, 0, visible, 1, 0, 16*ctl3D+1+8, 0,
- "CheckBox 1"
- };
-
- resource 'CNTL' (129) {
- {92, 22, 108, 142}, 1, visible, 1, 0, 16*ctl3D+2+8, 0,
- "Radio Button 1"
- };
-
- resource 'CNTL' (130) {
- {186, 20, 204, 140}, 0, visible, 1, 0, 16*ctl3D+togButton+8, 0,
- "Tog Button 1"
- };
-
- resource 'CNTL' (131) {
- {209, 20, 227, 140}, 1, visible, 1, 0, 16*ctl3D+togButton, 0,
- "Tog Button 2"
- };
-
- resource 'CNTL' (132) {
- {232, 20, 250, 140}, 0, visible, 1, 0, 16*ctl3D+togButton, 0,
- "Tog Button 3"
- };
-
- resource 'CNTL' (133) {
- {255, 20, 273, 140}, 0, visible, 1, 0, 16*ctl3D+togButton, 0,
- "Tog Button 4"
- };
-
- resource 'CNTL' (134) {
- {18, 220, 36, 381}, 0, visible, 0, 0, 16*dateTime+8, 0,
- "Date & Time"
- };
-
- resource 'CNTL' (136) {
- {41, 220, 59, 302}, 0, visible, 10, 0, 16*dateTime+8+1, 0,
- "Date only"
- };
-
- resource 'CNTL' (137) {
- {64, 220, 82, 302}, 0, visible, 10, 0, 16*dateTime+8+4, 0,
- "Time only"
- };
-
- resource 'CNTL' (138) {
- {142, 169, 165, 360}, popupTitleRightJust,
- visible, 45, 256, 16*popUp+8+1, 0, "Menu:"
- };
-
- resource 'CNTL' (139) {
- {173, 169, 192, 315}, popupTitleRightJust,
- visible, 45, 257, 16*popUp+8+4+1, 'FONT', "Font:"
- };
-
- resource 'CNTL' (140) {
- {173, 394, 192, 419}, popupTitleRightJust,
- visible, -1, 258, 16*popUp, 0, "popup Symbol only"
- };
-
- resource 'CNTL' (141) {
- {223, 169, 248, 354}, 0, visible, 1000, -1000, 16*spinner+1+8, 0,
- "Spin Number:"
- };
-
- resource 'CNTL' (142) {
- {253, 343, 271, 354}, 0, visible, 1000, -1000, 16*spinner+8, 0,
- "Spin (edit)"
- };
-
- resource 'CNTL' (143) {
- {1, 8, 17, 152}, 0, visible, 0, 0, 16*groupBox+1+2+8, 63,
- "Check boxes"
- };
-
- resource 'CNTL' (144) {
- {74, 8, 90, 152}, 0, visible, 0, 0, 16*groupBox+1+2+8, 88,
- "Radio buttons"
- };
-
- resource 'CNTL' (145) {
- {168, 8, 184, 152}, 0, visible, 0, 0, 16*groupBox+2+8, 113,
- "\"Tog\" buttons"
- };
-
- resource 'CNTL' (146) {
- {1, 164, 17, 419}, 0, visible, 0, 0, 16*groupBox+2+8, 89,
- "Date & Time controls"
- };
-
- resource 'CNTL' (147) {
- {128, 164, 144, 466}, 0, visible, 0, 0, 16*groupBox+2+8, 72,
- "Menu controls"
- };
-
- resource 'CNTL' (148) {
- {209, 164, 225, 364}, 0, visible, 0, 0, 16*groupBox+2+8, 72,
- "Spinner controls"
- };
-
- resource 'CNTL' (149) {
- {97, 298, 121, 419}, 0, visible, 100, 0, 16*hSlider, 0,
- "Horizontal slider control"
- };
-
- resource 'CNTL' (150, purgeable) {
- {7, 426, 112, 468}, 0, visible, 100, 0, 16*vSlider, 0,
- "Vertical slider control"
- };
-
- resource 'CNTL' (151) {
- {101, 182, 117, 288}, 50, visible, 100, 0, 16*progBar+2, 0,
- "Horizontal progress bar"
- };
-
- resource 'MENU' (256) {
- 256, textMenuProc, allEnabled, enabled, "Demo menu",
- { /* array: 5 elements */
- /* [1] */ "PopUp CDEF", noIcon, noKey, noMark, plain,
- /* [2] */ "Red Italic", noIcon, noKey, noMark, italic,
- /* [3] */ "Blue Outline", noIcon, noKey, noMark, outline,
- /* [4] */ "Green Bold", noIcon, noKey, noMark, bold,
- /* [5] */ "Item Five is a long item", noIcon, noKey, noMark, plain
- }
- };
-
- resource 'MENU' (257) {
- 257, textMenuProc, allEnabled, enabled, "empty Font menu",
- { /* array: 0 elements */
- }
- };
-
- resource 'MENU' (258) {
- 258, textMenuProc, allEnabled, enabled, "Font sizes",
- { /* array: 5 elements */
- /* [1] */ "9", noIcon, noKey, noMark, plain,
- /* [2] */ "10", noIcon, noKey, noMark, plain,
- /* [3] */ "12", noIcon, noKey, noMark, plain,
- /* [4] */ "14", noIcon, noKey, noMark, plain,
- /* [5] */ "18", noIcon, noKey, noMark, plain
- }
- };
-
- resource 'mctb' (256) {
- { /* array MCTBArray: 2 elements */
- /* [1] */ 256, 0,
- { /* array: 4 elements */
- /* [1] */ 0, 0, 0,
- /* [2] */ 0, 0, 0,
- /* [3] */ 0, 0, 0,
- /* [4] */ 37715, 65535, 65535
- },
- /* [2] */ 256, 2,
- { /* array: 4 elements */
- /* [1] */ 0, 0, 0,
- /* [2] */ 65535,0, 0,
- /* [3] */ 0, 0, 0,
- /* [4] */ 65535, 65535, 65535
- },
- /* [3] */ 256, 3,
- { /* array: 4 elements */
- /* [1] */ 0, 0, 0,
- /* [2] */ 0, 0, 65535,
- /* [3] */ 0, 0, 0,
- /* [4] */ 65535, 65535, 65535
- },
- /* [4] */ 256, 4,
- { /* array: 4 elements */
- /* [1] */ 0, 0, 0,
- /* [2] */ 0, 8738, 0,
- /* [3] */ 0, 0, 0,
- /* [4] */ 65535, 65535, 65535
- },
- /* [3] */ mctbLast, 0,
- { /* array: 4 elements */
- /* [1] */ 0, 0, 0,
- /* [2] */ 0, 0, 0,
- /* [3] */ 0, 0, 0,
- /* [4] */ 0, 0, 0
- }
- }
- };
-
- resource 'mctb' (257) {
- { /* array MCTBArray: 2 elements */
- /* [1] */
- 257, 0,
- { /* array: 4 elements */
- /* [1] */ 0, 0, 0,
- /* [2] */ 65535, 65535, 65535,
- /* [3] */ 0, 0, 65535,
- /* [4] */ 37715, 58572, 65535
- },
- /* [2] */
- mctbLast, 0,
- { /* array: 4 elements */
- /* [1] */ 0, 0, 0,
- /* [2] */ 0, 0, 0,
- /* [3] */ 0, 0, 0,
- /* [4] */ 0, 0, 0
- }
- }
- };